<div class="namecard-info">
<!--#=start page-->
<div class="namecard-page toggle-transition-1s namecard-page-relative">
  <!--#=start info-box-->
  <section class="info-box" style="background:{{main.syscolor || '#7c1cc9'}}">
    <div class="info-box-inner">
      <div class="info-avatar">
       <img ng-src="{{tomedia(pagedata.item.avatar) || '../core/resource/images/noavatar.gif'}}" class="info-avatar-thumbnail" style="width: 50px;height:50px">
      </div>
      <h3 class="info-box-name">{{pagedata.item.name}}</h3>
      <span class="info-box-post">{{pagedata.item.department}}</span>
      <span class="info-box-post">{{pagedata.item.company}}</span>
      <div class="info-text-box" style="text-align:center">
        <p class="line"></p>
		<div ng-if="pagedata.item.mobile && pagedata.setting.mobile" class="info-box-row">
		<i class="icon icon-phone" style="font-size:0.6rem"></i> <span class="vertical-m">手机：</span>
		<span class="vertical-m" href="javascript:;" ng-click="pagedata.call_mobile()">{{pagedata.owner || pagedata.member_secret.paymobile==1?pagedata.item.mobile:'*******'}}</span>
		<span ng-if="!pagedata.owner && pagedata.member_secret.paymobile!=1" class="vertical-m"><span ng-click="pagedata.goto('mobile')" class="label label-success">查看</span></span>
		</div>
		<div ng-if="pagedata.item.email && pagedata.setting.email" class="info-box-row">
			<i class="icon icon-email" style="font-size:0.6rem"></i><span class="vertical-m">邮箱：</span>
			<span class="vertical-m">{{pagedata.item.email}}</span>
			<span class="vertical-m">{{pagedata.owner || pagedata.member_secret.payemail==1?pagedata.item.email:'*******'}}</span>
			<span ng-if="!pagedata.owner && pagedata.member_secret.payemail!=1" class="vertical-m"><span ng-click="pagedata.goto('email')" class="label label-success">查看</span></span>
		</div>
		<div ng-if="pagedata.item.wechat_name && pagedata.setting.wechat_name" class="info-box-row">
		<i class="icon icon-weixin-copy" style="font-size:0.6rem"></i> <span class="vertical-m">微信：</span>
		<span class="vertical-m">{{pagedata.owner || pagedata.member_secret.paywechat==1?pagedata.item.wechat_name:'*******'}}</span>
		<span ng-if="!pagedata.owner && pagedata.member_secret.paywechat!=1" class="vertical-m"><span ng-click="pagedata.goto('wechat')" class="label label-success">查看</span></span>
		</div>
		<div ng-if="pagedata.item.address && pagedata.setting.address" class="info-box-row">
		<i class="icon icon-map" style="font-size:0.6rem"></i><span class="vertical-m">地址：</span>
		<span class="vertical-m">{{pagedata.owner || pagedata.member_secret.payaddress==1?pagedata.item.address:'*******'}}</span>
		<span ng-if="!pagedata.owner && pagedata.member_secret.payaddress!=1" class="vertical-m"><span ng-click="pagedata.goto('address')" class="label label-success">查看</span></span>
		</div>
		<div class="info-box-row" style="padding-left: 0px; ">
		<span class="vertical-m" style="overflow:auto">{{pagedata.item.qianming}}</span>
		</div>
      </div>
    </div>
    <ul class="info-box-stat" style="background:none">
    	<li class="info-box-item" >
        <a onclick="likeAjax()" href="javascript:">
        <span><i class="ico-hand"></i>赞</span>
        <span class="info-number" id="zan">{{pagedata.zan}}</span>
        </a>
        <i class="stat-line"></i>
      </li>
      <li class="info-box-item">
        <a href="javascript:">
        <span>人脉</span>
        <span class="info-number">{{pagedata.renmai}}</span>
        </a>
        <i class="stat-line"></i>
      </li>
      <li class="info-box-item">
        <a href="javascript:">
        <span>被查看</span>
        <span class="info-number">{{pagedata.look}}</span>
        </a>
      </li>
    </ul>
  </section>
  <!--#=end info-box--> 
  
  <!--#=start info-column-->
  <section class="jy-content info-column">
    <ul class="fovorite-text-inner">
      			<li class="info--text-item">
		          <span class="info-name-tit">TA专注：</span>{{pagedata.item.attention}}</li> 
		       	<li class="info--text-item">
		          <span class="info-name-tit">TA在找：</span>{{pagedata.item.find}}</li> 
	</ul>
 </section>
 <div class="weui_btn_area">
		<a ng-if="pagedata.have" class="weui_btn weui_btn_primary" style="color:#fff" href="javascript:" ng-click="access_json('/index/')">我的微名片</a>
		<a ng-if="pagedata.no" class="weui_btn weui_btn_primary" style="color:#fff" href="javascript:" ng-click="access_json('/info/')">我也要一个</a>
		<a ng-if="pagedata.owner" class="weui_btn weui_btn_primary" style="color:#fff" href="javascript:" ng-click="access_json('/info/')">编辑</a>
</div>
</div>
</div>
<script>
scope.pagedata.call_qq=function(){
	if(scope.pagedata.setting.qq_name){
		window.location.href='http://wpa.qq.com/msgrd?v=3&uin='+scope.pagedata.item.qq_name+'&site=qq&menu=yes';
	}else{
		scope.message('对方设置了隐私保护，不能通过QQ联系！');
	}
}
scope.pagedata.call_mobile=function(){
	scope.pagedata.member_secret=scope.pagedata.member_secret?scope.pagedata.member_secret:{}
	if(scope.pagedata.owner || scope.pagedata.member_secret.paymobile==1){
		if(scope.pagedata.setting.mobile){
			window.location.href='tel://'+scope.pagedata.item.mobile;
		}else{
			scope.message('对方设置了隐私保护，不能打电话！');
		}
	}else{
		scope.message('当前无权拨打该电话！');
	}
}
scope.pagedata.goto=function(name){
	if(name=='mobile' && scope.pagedata.member_secret.paymobile!=1){
		scope.pagedata.showtype=true;
		scope.pagedata.namefee='mobile_fee';
		scope.$evalAsync();
	}
	if(name=='email' && scope.pagedata.member_secret.payemail!=1){
		scope.pagedata.showtype=true;
		scope.pagedata.namefee='email_fee';
		scope.$evalAsync();
	}
	if(name=='address' && scope.pagedata.member_secret.payaddress!=1){
		scope.pagedata.showtype=true;
		scope.pagedata.namefee='address_fee';
		scope.$evalAsync();
	}
	if(name=='wechat' && scope.pagedata.member_secret.paywechat!=1){
		scope.pagedata.showtype=true;
		scope.pagedata.namefee='wechat_fee';
		scope.$evalAsync();
	}
}
scope.pagedata.pay=function(){
	var complete_url='/home//mid='+scope.pagedata.item.mid;
	if(scope.pagedata.pay_id){
		scope.tool.pay(scope.pagedata.pay_id,function(res){
			if(res.type=='success'){
				scope.message('支付成功！','success',complete_url);
			}else{
				scope.message('支付失败！','success',complete_url);
			}
		},'','',complete_url,complete_url);
	}else{
		scope.post_json('/index/pay/',{'namefee':scope.pagedata.namefee,'tomid':scope.pagedata.item.mid},function(result){
				if(result.order_id){
					scope.pagedata.pay_id=result.pay_id;
					scope.$evalAsync();
					scope.tool.pay(result.pay_id,function(res){
						if(res.type=='success'){
							scope.message('支付成功！','success',complete_url);
						}else{
							scope.message('支付失败！','success',complete_url);
						}
					},'','',complete_url,complete_url);
				}else{
					scope.message(result);
				}
		});
	}
}
</script>

<div class="popup" ng-if="pagedata.showtype">
	<div class="popup-body">
		<div class="popup-center" style="padding:1rem;">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showtype=false"></i>
			<div class="weui_btn weui_btn_primary" ng-click="pagedata.pay()">付费看(￥{{pagedata.member_secret[pagedata.namefee] ||'0.00'}})</div>
		</div>
	</div>
</div>